package lab01;

import java.util.Scanner;

public class Test07 {

    public static void main(String[] args) {
        Scanner s=new Scanner(System.in);
        int i=(int)(Math.random()*100)+1;
        int k;
        for (k=0;k<=100;k++) {
            System.out.printf("请输入一个0~100的整数：");
            int j=s.nextInt();
            if (j < i) {
                System.out.println("猜小了");
            } else if (j > i) {
                System.out.println("猜大了");
            }else {
                System.out.println("猜对了");
            }
        }
    }
}

